import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 高生平
 * Date: 2025-09-06
 * Time: 18:43
 */
public class Test {
    public static int Factorial (int n) {
        if (n == 1) {
            return 1;
        }
        return Factorial(n - 1) * n;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextInt()) {
            int n = sc.nextInt();
            System.out.println(n + "! = " + Factorial(n));
        }
    }
}
